package com.xiaodeng.xdblogspringboot.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public abstract class ServiceException extends RuntimeException{
    private int code;//业务状态码  200-成功  500-失败
    private String message;//提示信息
    private Object data;//响应数据

    public ServiceException(int code, String message) {
        this(code, message, null);
    }
}
